"""
闭包练习
在不改变添插入和删除函数的代码，增加功能验证
"""

def insert():
    print('添加')

def delete():
    print('删除')

# 添加验证
def verify(func):
    def wrapper():
        print('数据验证')
        func()
    return wrapper

# insert()
insert = verify(insert)
insert()

delete = verify(delete)
delete()